{% extends 'layout.html' %}
{% block content %}
<div class="container">
        <div style="margin-bottom: 10px">
            <a class="btn btn-success" href="/depart/add/">
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                Add department</a>
        </div>

        <div class="bs-example" data-example-id="panel-without-body-with-table">
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading">

                    <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>

                    Department List
                </div>

                <!-- Table -->
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>Name</th>
                        <th>Operation</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for d in queryset %}
                        <tr>
                        <th>{{ d.id }}</th>
                        <td>{{ d.title }}</td>
                        <td>
                            <a class="btn btn-primary btn-xs" href="/depart/{{ d.id }}/edit/">Edit</a>
                            <a class="btn btn-danger btn-xs" href="/depart/delete?nid={{ d.id }}">Delete</a>
                        </td>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
</div>

{% endblock %}



